package cn.est.controller;

import cn.est.dto.Result;
import cn.est.service.EvaluateService;
import cn.est.util.ResultUtil;
import cn.est.vo.MalfunctionVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class EvaluateController {

    @Autowired
    private EvaluateService evaluateService;
    @GetMapping("/api/evaluate/specList")
    public Result<List<MalfunctionVO>> specList(Long modelId) {
        List<MalfunctionVO> specList = evaluateService.getSpecListByModelId(modelId);
        return ResultUtil.success(specList);
    }
}
